<?php
class transfakprodjual_model extends CI_Model{
	private $nofaktur;
	private $kodebarang;
	private $hargabarang;
	private $quantity;
	private $discount;
	private $ppn;
	private $amount;

	function setNoFaktur($nfak){
		$this->nofaktur = $nfak;
	}

	function getNoFaktur(){
		return $this->nofaktur;
	}

	function setKodeBarang($kdBarang){
		$this->kodebarang = $kdBarang;
	}

	function getKodeBarang(){
		return $this->kodebarang;
	}

	function setHargaBarang($harga){
		$this->hargabarang = $harga;
	}

	function getHargaBarang(){
		return $this->hargabarang;
	}

	function setQuantity($qty){
		$this->quantity = $qty;
	}

	function getQuantity(){
		return $this->quantity;
	}

	function setDiscount($disc){
		$this->discount = $disc;
	}

	function getDiscount(){
		return $this->discount;
	}

	function setPpn($ppn){
		$this->ppn = $ppn;
	}

	function getPpn(){
		return $this->ppn;
	}

	function setAmount($amt){
		$this->amount = $amt;
	}

	function getAmount(){
		return $this->amount;
	}

	// Call the module constructor
	function __construct(){
		parent::__construct();
	}

	function insert(){
		$data = array(
			'nofaktur' => $this->getNoFaktur(),
			'kodebarang' => $this->getKodeBarang(),
			'hargabarang' => $this->getHargaBarang(),
			'quantity' => $this->getQuantity(),
			'discount' => $this->getDiscount(),
			'ppn' => $this->getPpn(),
			'amount' => $this->getAmount()
		);
		$this->db->insert('transaction_faktur_product_penjualan',$data);
	}
}